﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormsApp1
{
    public delegate void MyDelegate2(int id, int sw, string param);
    public partial class Form3 : Form
    {
        public event MyDelegate2 MyEvent2;
        public Form3()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MyEvent2(Int32.Parse(textBox1.Text),
                    comboBox1.SelectedIndex + 1, 
                    textBox2.Text);
            this.Close();
        }
    }
}
